import 'package:flutter/material.dart';

void main() => runApp(HomePage());

class HomePage extends StatefulWidget {
  @override
  _HomePageState createState() => _HomePageState();
}

class _HomePageState extends State<HomePage> {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: Text("gesture dector"),
        ),
        body: Center(
          child: MyButton(),
        ),
      ),
    );
  }
}

class MyButton extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return GestureDetector(
      onDoubleTap: ()=>print("doubleTap"),
      onTap: () => print("onTap"),
      child: Container(
        decoration: BoxDecoration(borderRadius: BorderRadius.circular(15), color: Theme.of(context).buttonColor),
        padding: EdgeInsets.all(15),
        child: Text("Button"),
      ),
    );
  }
}
